package cn.com.vrv.repository.mysql;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import cn.com.vrv.domain.mysql.MonitorCategory;

/**
 * MYSQL JPA
 * 
 * @author 赵炎
 * @version [V1.00, 2018年2月27日]
 * @see [相关类/方法]
 * @since V1.00
 */
@Repository(value="MonitorCategoryRepository")
public interface MonitorCategoryRepository extends JpaRepository<MonitorCategory, Long>
{
    List<MonitorCategory> findByOrganizationCode(String organizationCode);
    
    @Query("from MonitorCategory where organizationCode =?1 and categoryName =?2")
    MonitorCategory findByCategoryCodeAndCategoryName(String organizationCode,String categoryName);
}
